<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>perl581delta - what is new for perl v5.8.1 - Perldoc Browser</title>
    <link rel="search" href="https://perldoc.perl.org/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser">
    <link rel="canonical" href="https://perldoc.perl.org/perl581delta">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" />
    <style>
      body {
        background: #f4f4f5;
        color: #020202;
      }
      .navbar-dark {
        background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0);
        background-repeat: repeat-x;
      }
      .navbar-dark .navbar-nav .nav-link,
      .navbar-dark .navbar-nav .nav-link:focus { color: #fff }
      .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 }
      #wrapperlicious {
        margin: 0 auto;
        font: 0.9em 'Helvetica Neue', Helvetica, sans-serif;
        font-weight: normal;
        line-height: 1.5em;
        margin: 0;
        padding: 0;
      }
      #wrapperlicious h1 { font-size: 1.5em }
      #wrapperlicious h2 { font-size: 1.3em }
      #wrapperlicious h3 { font-size: 1.1em }
      #wrapperlicious h4 { font-size: 0.9em }
      #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3,
      #wrapperlicious h4, #wrapperlicious dt {
        color: #020202;
        margin-top: 1em;
        margin-bottom: 1em;
        position: relative;
        font-weight: bold;
      }
      #wrapperlicious a { color: inherit; text-decoration: underline }
      #wrapperlicious #toc { text-decoration: none }
      #wrapperlicious a:hover { color: #2a2a2a }
      #wrapperlicious a img { border: 0 }
      #wrapperlicious :not(pre) > code {
        color: inherit;
        background-color: rgba(0, 0, 0, 0.04);
        border-radius: 3px;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        padding: 0.3em;
      }
      #wrapperlicious dd {
        margin: 0;
        margin-left: 2em;
      }
      #wrapperlicious dt {
        color: #2a2a2a;
        font-weight: bold;
        margin-left: 0.9em;
      }
      #wrapperlicious p {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious li > p {
        margin-bottom: 0;
        margin-top: 0;
      }
      #wrapperlicious pre {
        border: 1px solid #c1c1c1;
        border-radius: 3px;
        font: 100% Consolas, Menlo, Monaco, monospace;
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious pre > code {
        display: block;
        background-color: #f6f6f6;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        line-height: 1.5em;
        text-align: left;
        white-space: pre;
        padding: 1em;
      }
      #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious ul {
        list-style-type: square;
      }
      #wrapperlicious ul ul {
        margin-bottom: 0px;
        margin-top: 0px;
      }
      #footer {
        font-size: 0.8em;
        padding-top: 0.5em;
        text-align: center;
      }
      #more {
        display: inline;
        font-size: 0.8em;
      }
      #perldocdiv {
        background-color: #fff;
        border: 1px solid #c1c1c1;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        margin-left: auto;
        margin-right: auto;
        padding: 3em;
        padding-top: 1em;
        max-width: 960px;
      }
      #moduleversion { float: right }
      #wrapperlicious .leading-notice {
        font-style: italic;
        padding-left: 1em;
        margin-top: 1em;
        margin-bottom: 1em;
      }
      #wrapperlicious .permalink {
        display: none;
        left: -0.75em;
        position: absolute;
        padding-right: 0.25em;
        text-decoration: none;
      }
      #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink,
      #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink,
      #wrapperlicious dt:hover .permalink {
        display: block;
      }
    </style>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-KVNWBNT5FB');
      gtag('config', 'UA-50555-3');
    </script>
  </head>
  <body>
    <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand" href="https://perldoc.perl.org/">Perldoc Browser</a>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perl581delta.html#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.35.0</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-stable">
          <a class="dropdown-item" href="https://perldoc.perl.org/perl581delta">Latest</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.2/perl581delta">5.38.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.1/perl581delta">5.38.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0/perl581delta">5.38.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.3/perl581delta">5.36.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.2/perl581delta">5.36.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.1/perl581delta">5.36.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.0/perl581delta">5.36.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.3/perl581delta">5.34.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.2/perl581delta">5.34.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.1/perl581delta">5.34.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.0/perl581delta">5.34.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.1/perl581delta">5.32.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.0/perl581delta">5.32.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.3/perl581delta">5.30.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.2/perl581delta">5.30.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.1/perl581delta">5.30.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.0/perl581delta">5.30.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.3/perl581delta">5.28.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.2/perl581delta">5.28.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.1/perl581delta">5.28.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.0/perl581delta">5.28.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.3/perl581delta">5.26.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.2/perl581delta">5.26.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.1/perl581delta">5.26.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.0/perl581delta">5.26.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.4/perl581delta">5.24.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.3/perl581delta">5.24.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.2/perl581delta">5.24.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.1/perl581delta">5.24.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.0/perl581delta">5.24.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.4/perl581delta">5.22.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.3/perl581delta">5.22.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.2/perl581delta">5.22.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.1/perl581delta">5.22.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.0/perl581delta">5.22.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.3/perl581delta">5.20.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.2/perl581delta">5.20.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.1/perl581delta">5.20.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.0/perl581delta">5.20.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.4/perl581delta">5.18.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.3/perl581delta">5.18.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.2/perl581delta">5.18.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.1/perl581delta">5.18.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.0/perl581delta">5.18.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.3/perl581delta">5.16.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.2/perl581delta">5.16.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.1/perl581delta">5.16.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.0/perl581delta">5.16.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.4/perl581delta">5.14.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.3/perl581delta">5.14.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.2/perl581delta">5.14.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.1/perl581delta">5.14.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.0/perl581delta">5.14.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.5/perl581delta">5.12.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.4/perl581delta">5.12.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.3/perl581delta">5.12.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.2/perl581delta">5.12.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.1/perl581delta">5.12.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.0/perl581delta">5.12.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.1/perl581delta">5.10.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.0/perl581delta">5.10.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.9/perl581delta">5.8.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.8/perl581delta">5.8.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.7/perl581delta">5.8.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.6/perl581delta">5.8.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.5/perl581delta">5.8.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.4/perl581delta">5.8.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.3/perl581delta">5.8.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.2/perl581delta">5.8.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.1/perl581delta">5.8.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.0/perl581delta">5.8.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.2/perl581delta">5.6.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.1/perl581delta">5.6.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.0/perl581delta">5.6.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_04/perl581delta">5.005_04</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_03/perl581delta">5.005_03</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_02/perl581delta">5.005_02</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_01/perl581delta">5.005_01</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005/perl581delta">5.005</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perl581delta.html#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-dev">
          <a class="dropdown-item" href="https://perldoc.perl.org/blead/perl581delta">blead</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.6/perl581delta">5.39.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.5/perl581delta">5.39.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.4/perl581delta">5.39.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.3/perl581delta">5.39.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.2/perl581delta">5.39.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.1/perl581delta">5.39.1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC2/perl581delta">5.38.0-RC2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC1/perl581delta">5.38.0-RC1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.11/perl581delta">5.37.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.10/perl581delta">5.37.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.9/perl581delta">5.37.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.8/perl581delta">5.37.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.7/perl581delta">5.37.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.6/perl581delta">5.37.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.5/perl581delta">5.37.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.4/perl581delta">5.37.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.3/perl581delta">5.37.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.2/perl581delta">5.37.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.1/perl581delta">5.37.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.0/perl581delta">5.37.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.11/perl581delta">5.35.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.10/perl581delta">5.35.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.9/perl581delta">5.35.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.8/perl581delta">5.35.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.7/perl581delta">5.35.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.6/perl581delta">5.35.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.5/perl581delta">5.35.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.4/perl581delta">5.35.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.3/perl581delta">5.35.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.2/perl581delta">5.35.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.1/perl581delta">5.35.1</a>
          <a class="dropdown-item active" href="perl581delta.html">5.35.0</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perl581delta.html#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-nav">
          <a class="dropdown-item" href="perl.html">Perl</a>
          <a class="dropdown-item" href="perlintro.html">Intro</a>
          <a class="dropdown-item" href="perl.html#Tutorials">Tutorials</a>
          <a class="dropdown-item" href="perlfaq.html">FAQs</a>
          <a class="dropdown-item" href="perl.html#Reference-Manual">Reference</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlop.html">Operators</a>
          <a class="dropdown-item" href="functions.html">Functions</a>
          <a class="dropdown-item" href="variables.html">Variables</a>
          <a class="dropdown-item" href="modules.html">Modules</a>
          <a class="dropdown-item" href="perlutil.html">Utilities</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlcommunity.html">Community</a>
          <a class="dropdown-item" href="perlhist.html">History</a>
        </div>
      </li>
    </ul>
    <ul class="navbar-nav">
      <script>
        function set_expand (expand) {
          var perldocdiv = document.getElementById('perldocdiv');
          var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width');
          var expanded = (width == '' || width == 'none') ? true : false;
          if (expand === null) {
            expand = !expanded;
          }
          if ((expand && !expanded) || (!expand && expanded)) {
            perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px');
            var button_classlist = document.getElementById('content-expand-button').classList;
            if (expand) {
              button_classlist.add('btn-light');
              button_classlist.remove('btn-outline-light');
            } else {
              button_classlist.add('btn-outline-light');
              button_classlist.remove('btn-light');
            }
          }
          return expand;
        }
        function toggle_expand () {
          var expand = set_expand(null);
          document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC';
        }
        function read_expand () {
          return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 });
        }
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', function () {
            if (read_expand()) {
              set_expand(true);
            }
          });
        } else if (read_expand()) {
          set_expand(true);
        }
      </script>
      <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-2" onclick="toggle_expand()">Expand</button>
    <ul>
    <form class="form-inline" method="get" action="https://perldoc.perl.org/5.35.0/search">
      <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search">
    </form>
  </div>
</nav>

    <div id="wrapperlicious" class="container-fluid">
      <div id="perldocdiv">
        <div id="links">
          <a href="perl581delta.html">perl581delta</a>
          <div id="more">
            (<a href="perl581delta.txt">source</a>,
            <a href="https://metacpan.org/pod/perl581delta">CPAN</a>)
          </div>
        </div>
        <div class="leading-notice">
          You are viewing the version of this documentation from Perl 5.35.0.
            This is a development version of Perl.
        </div>
        <h1><a id="toc">CONTENTS</a></h1>
                  <ul>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#NAME">NAME</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#DESCRIPTION">DESCRIPTION</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Incompatible-Changes">Incompatible Changes</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Hash-Randomisation">Hash Randomisation</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#UTF-8-On-Filehandles-No-Longer-Activated-By-Locale">UTF-8 On Filehandles No Longer Activated By Locale</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Single-number-v-strings-are-no-longer-v-strings-before-%22=%3E%22">Single-number v-strings are no longer v-strings before &quot;=&gt;&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#(Win32)-The-C-Switch-Has-Been-Repurposed">(Win32) The -C Switch Has Been Repurposed</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#(Win32)-The-/d-Switch-Of-cmd.exe">(Win32) The /d Switch Of cmd.exe</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Core-Enhancements">Core Enhancements</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#UTF-8-no-longer-default-under-UTF-8-locales">UTF-8 no longer default under UTF-8 locales</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Unsafe-signals-again-available">Unsafe signals again available</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Tied-Arrays-with-Negative-Array-Indices">Tied Arrays with Negative Array Indices</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#local-$%7B$x%7D">local ${$x}</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Unicode-Character-Database-4.0.0">Unicode Character Database 4.0.0</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Deprecation-Warnings">Deprecation Warnings</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#(Reminder)-Pseudo-hashes-are-deprecated-(really)">(Reminder) Pseudo-hashes are deprecated (really)</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#(Reminder)-5.005-style-threads-are-deprecated-(really)">(Reminder) 5.005-style threads are deprecated (really)</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#(Reminder)-The-$*-variable-is-deprecated-(really)">(Reminder) The $* variable is deprecated (really)</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Miscellaneous-Enhancements">Miscellaneous Enhancements</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Modules-and-Pragmata">Modules and Pragmata</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Updated-Modules-And-Pragmata">Updated Modules And Pragmata</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Utility-Changes">Utility Changes</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-Documentation">New Documentation</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Installation-and-Configuration-Improvements">Installation and Configuration Improvements</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Platform-specific-enhancements">Platform-specific enhancements</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Selected-Bug-Fixes">Selected Bug Fixes</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Closures,-eval-and-lexicals">Closures, eval and lexicals</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Generic-fixes">Generic fixes</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Platform-specific-fixes">Platform-specific fixes</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-or-Changed-Diagnostics">New or Changed Diagnostics</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Changed-%22A-thread-exited-while-%25d-threads-were-running%22">Changed &quot;A thread exited while %d threads were running&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Removed-%22Attempt-to-clear-a-restricted-hash%22">Removed &quot;Attempt to clear a restricted hash&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-%22Illegal-declaration-of-anonymous-subroutine%22">New &quot;Illegal declaration of anonymous subroutine&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Changed-%22Invalid-range-%22%25s%22-in-transliteration-operator%22">Changed &quot;Invalid range &quot;%s&quot; in transliteration operator&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-%22Missing-control-char-name-in-%5Cc%22">New &quot;Missing control char name in \c&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-%22Newline-in-left-justified-string-for-%25s%22">New &quot;Newline in left-justified string for %s&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-%22Possible-precedence-problem-on-bitwise-%25c-operator%22">New &quot;Possible precedence problem on bitwise %c operator&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-%22Pseudo-hashes-are-deprecated%22">New &quot;Pseudo-hashes are deprecated&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-%22read()-on-%25s-filehandle-%25s%22">New &quot;read() on %s filehandle %s&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-%225.005-threads-are-deprecated%22">New &quot;5.005 threads are deprecated&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-%22Tied-variable-freed-while-still-in-use%22">New &quot;Tied variable freed while still in use&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-%22To%25s:-illegal-mapping-&#39;%25s&#39;%22">New &quot;To%s: illegal mapping &#39;%s&#39;&quot;</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-%22Use-of-freed-value-in-iteration%22">New &quot;Use of freed value in iteration&quot;</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Changed-Internals">Changed Internals</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#New-Tests">New Tests</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Known-Problems">Known Problems</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Tied-hashes-in-scalar-context">Tied hashes in scalar context</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Net::Ping-450_service-and-510_ping_udp-failures">Net::Ping 450_service and 510_ping_udp failures</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#B::C">B::C</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Platform-Specific-Problems">Platform Specific Problems</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#EBCDIC-Platforms">EBCDIC Platforms</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Cygwin-1.5-problems">Cygwin 1.5 problems</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#HP-UX:-HP-cc-warnings-about-sendfile-and-sendpath">HP-UX: HP cc warnings about sendfile and sendpath</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#IRIX:-t/uni/tr_7jis.t-falsely-failing">IRIX: t/uni/tr_7jis.t falsely failing</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Mac-OS-X:-no-usemymalloc">Mac OS X: no usemymalloc</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Tru64:-No-threaded-builds-with-GNU-cc-(gcc)">Tru64: No threaded builds with GNU cc (gcc)</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Win32:-sysopen,-sysread,-syswrite">Win32: sysopen, sysread, syswrite</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Future-Directions">Future Directions</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#Reporting-Bugs">Reporting Bugs</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl581delta.html#SEE-ALSO">SEE ALSO</a>
              </li>
          </ul>

      <h1 id="NAME"><a class="permalink" href="perl581delta.html#NAME">#</a>NAME</h1>

<p>perl581delta - what is new for perl v5.8.1</p>

<h1 id="DESCRIPTION"><a class="permalink" href="perl581delta.html#DESCRIPTION">#</a>DESCRIPTION</h1>

<p>This document describes differences between the 5.8.0 release and the 5.8.1 release.</p>

<p>If you are upgrading from an earlier release such as 5.6.1, first read the <a href="perl58delta.html">perl58delta</a>, which describes differences between 5.6.0 and 5.8.0.</p>

<p>In case you are wondering about 5.6.1, it was bug-fix-wise rather identical to the development release 5.7.1. Confused? This timeline hopefully helps a bit: it lists the new major releases, their maintenance releases, and the development releases.</p>

<pre><code class="plaintext">New     Maintenance  Development

5.6.0                             2000-Mar-22
                     5.7.0        2000-Sep-02
        5.6.1                     2001-Apr-08
                     5.7.1        2001-Apr-09
                     5.7.2        2001-Jul-13
                     5.7.3        2002-Mar-05
5.8.0                             2002-Jul-18
        5.8.1                     2003-Sep-25</code></pre>

<h1 id="Incompatible-Changes"><a class="permalink" href="perl581delta.html#Incompatible-Changes">#</a><a id="Incompatible"></a>Incompatible Changes</h1>

<h2 id="Hash-Randomisation"><a class="permalink" href="perl581delta.html#Hash-Randomisation">#</a><a id="Hash"></a>Hash Randomisation</h2>

<p>Mainly due to security reasons, the &quot;random ordering&quot; of hashes has been made even more random. Previously while the order of hash elements from keys(), values(), and each() was essentially random, it was still repeatable. Now, however, the order varies between different runs of Perl.</p>

<p><b>Perl has never guaranteed any ordering of the hash keys</b>, and the ordering has already changed several times during the lifetime of Perl 5. Also, the ordering of hash keys has always been, and continues to be, affected by the insertion order.</p>

<p>The added randomness may affect applications.</p>

<p>One possible scenario is when output of an application has included hash data. For example, if you have used the Data::Dumper module to dump data into different files, and then compared the files to see whether the data has changed, now you will have false positives since the order in which hashes are dumped will vary. In general the cure is to sort the keys (or the values); in particular for Data::Dumper to use the <code>Sortkeys</code> option. If some particular order is really important, use tied hashes: for example the Tie::IxHash module which by default preserves the order in which the hash elements were added.</p>

<p>More subtle problem is reliance on the order of &quot;global destruction&quot;. That is what happens at the end of execution: Perl destroys all data structures, including user data. If your destructors (the DESTROY subroutines) have assumed any particular ordering to the global destruction, there might be problems ahead. For example, in a destructor of one object you cannot assume that objects of any other class are still available, unless you hold a reference to them. If the environment variable PERL_DESTRUCT_LEVEL is set to a non-zero value, or if Perl is exiting a spawned thread, it will also destruct the ordinary references and the symbol tables that are no longer in use. You can&#39;t call a class method or an ordinary function on a class that has been collected that way.</p>

<p>The hash randomisation is certain to reveal hidden assumptions about some particular ordering of hash elements, and outright bugs: it revealed a few bugs in the Perl core and core modules.</p>

<p>To disable the hash randomisation in runtime, set the environment variable PERL_HASH_SEED to 0 (zero) before running Perl (for more information see <a href="perlrun.html#PERL_HASH_SEED">&quot;PERL_HASH_SEED&quot; in perlrun</a>), or to disable the feature completely in compile time, compile with <code>-DNO_HASH_SEED</code> (see <i>INSTALL</i>).</p>

<p>See <a href="perlsec.html#Algorithmic-Complexity-Attacks">&quot;Algorithmic Complexity Attacks&quot; in perlsec</a> for the original rationale behind this change.</p>

<h2 id="UTF-8-On-Filehandles-No-Longer-Activated-By-Locale"><a class="permalink" href="perl581delta.html#UTF-8-On-Filehandles-No-Longer-Activated-By-Locale">#</a><a id="UTF"></a>UTF-8 On Filehandles No Longer Activated By Locale</h2>

<p>In Perl 5.8.0 all filehandles, including the standard filehandles, were implicitly set to be in Unicode UTF-8 if the locale settings indicated the use of UTF-8. This feature caused too many problems, so the feature was turned off and redesigned: see <a href="perl581delta.html#Core-Enhancements">&quot;Core Enhancements&quot;</a>.</p>

<h2 id="Single-number-v-strings-are-no-longer-v-strings-before-&quot;=&gt;&quot;"><a class="permalink" href="perl581delta.html#Single-number-v-strings-are-no-longer-v-strings-before-%22=%3E%22">#</a><a id="Single"></a><a id="Single-number-v-strings-are-no-longer-v-strings-before"></a>Single-number v-strings are no longer v-strings before &quot;=&gt;&quot;</h2>

<p>The version strings or v-strings (see <a href="perldata.html#Version-Strings">&quot;Version Strings&quot; in perldata</a>) feature introduced in Perl 5.6.0 has been a source of some confusion-- especially when the user did not want to use it, but Perl thought it knew better. Especially troublesome has been the feature that before a &quot;=&gt;&quot; a version string (a &quot;v&quot; followed by digits) has been interpreted as a v-string instead of a string literal. In other words:</p>

<pre><code>%h = ( v65 =&gt; 42 );</code></pre>

<p>has meant since Perl 5.6.0</p>

<pre><code>%h = ( &#39;A&#39; =&gt; 42 );</code></pre>

<p>(at least in platforms of ASCII progeny) Perl 5.8.1 restores the more natural interpretation</p>

<pre><code>%h = ( &#39;v65&#39; =&gt; 42 );</code></pre>

<p>The multi-number v-strings like v65.66 and 65.66.67 still continue to be v-strings in Perl 5.8.</p>

<h2 id="(Win32)-The-C-Switch-Has-Been-Repurposed"><a class="permalink" href="perl581delta.html#(Win32)-The-C-Switch-Has-Been-Repurposed">#</a><a id="Win32-The--C-Switch-Has-Been-Repurposed"></a>(Win32) The -C Switch Has Been Repurposed</h2>

<p>The -C switch has changed in an incompatible way. The old semantics of this switch only made sense in Win32 and only in the &quot;use utf8&quot; universe in 5.6.x releases, and do not make sense for the Unicode implementation in 5.8.0. Since this switch could not have been used by anyone, it has been repurposed. The behavior that this switch enabled in 5.6.x releases may be supported in a transparent, data-dependent fashion in a future release.</p>

<p>For the new life of this switch, see <a href="perl581delta.html#UTF-8-no-longer-default-under-UTF-8-locales">&quot;UTF-8 no longer default under UTF-8 locales&quot;</a>, and <a href="perlrun.html#-C">&quot;-C&quot; in perlrun</a>.</p>

<h2 id="(Win32)-The-/d-Switch-Of-cmd.exe"><a class="permalink" href="perl581delta.html#(Win32)-The-/d-Switch-Of-cmd.exe">#</a><a id="Win32-The-d-Switch-Of-cmd.exe"></a>(Win32) The /d Switch Of cmd.exe</h2>

<p>Perl 5.8.1 uses the /d switch when running the cmd.exe shell internally for system(), backticks, and when opening pipes to external programs. The extra switch disables the execution of AutoRun commands from the registry, which is generally considered undesirable when running external programs. If you wish to retain compatibility with the older behavior, set PERL5SHELL in your environment to <code>cmd /x/c</code>.</p>

<h1 id="Core-Enhancements"><a class="permalink" href="perl581delta.html#Core-Enhancements">#</a><a id="Core"></a>Core Enhancements</h1>

<h2 id="UTF-8-no-longer-default-under-UTF-8-locales"><a class="permalink" href="perl581delta.html#UTF-8-no-longer-default-under-UTF-8-locales">#</a><a id="UTF1"></a>UTF-8 no longer default under UTF-8 locales</h2>

<p>In Perl 5.8.0 many Unicode features were introduced. One of them was found to be of more nuisance than benefit: the automagic (and silent) &quot;UTF-8-ification&quot; of filehandles, including the standard filehandles, if the user&#39;s locale settings indicated use of UTF-8.</p>

<p>For example, if you had <code>en_US.UTF-8</code> as your locale, your STDIN and STDOUT were automatically &quot;UTF-8&quot;, in other words an implicit binmode(..., &quot;:utf8&quot;) was made. This meant that trying to print, say, chr(0xff), ended up printing the bytes 0xc3 0xbf. Hardly what you had in mind unless you were aware of this feature of Perl 5.8.0. The problem is that the vast majority of people weren&#39;t: for example in RedHat releases 8 and 9 the <b>default</b> locale setting is UTF-8, so all RedHat users got UTF-8 filehandles, whether they wanted it or not. The pain was intensified by the Unicode implementation of Perl 5.8.0 (still) having nasty bugs, especially related to the use of s/// and tr///. (Bugs that have been fixed in 5.8.1)</p>

<p>Therefore a decision was made to backtrack the feature and change it from implicit silent default to explicit conscious option. The new Perl command line option <code>-C</code> and its counterpart environment variable PERL_UNICODE can now be used to control how Perl and Unicode interact at interfaces like I/O and for example the command line arguments. See <a href="perlrun.html#-C">&quot;-C&quot; in perlrun</a> and <a href="perlrun.html#PERL_UNICODE">&quot;PERL_UNICODE&quot; in perlrun</a> for more information.</p>

<h2 id="Unsafe-signals-again-available"><a class="permalink" href="perl581delta.html#Unsafe-signals-again-available">#</a><a id="Unsafe"></a>Unsafe signals again available</h2>

<p>In Perl 5.8.0 the so-called &quot;safe signals&quot; were introduced. This means that Perl no longer handles signals immediately but instead &quot;between opcodes&quot;, when it is safe to do so. The earlier immediate handling easily could corrupt the internal state of Perl, resulting in mysterious crashes.</p>

<p>However, the new safer model has its problems too. Because now an opcode, a basic unit of Perl execution, is never interrupted but instead let to run to completion, certain operations that can take a long time now really do take a long time. For example, certain network operations have their own blocking and timeout mechanisms, and being able to interrupt them immediately would be nice.</p>

<p>Therefore perl 5.8.1 introduces a &quot;backdoor&quot; to restore the pre-5.8.0 (pre-5.7.3, really) signal behaviour. Just set the environment variable PERL_SIGNALS to <code>unsafe</code>, and the old immediate (and unsafe) signal handling behaviour returns. See <a href="perlrun.html#PERL_SIGNALS">&quot;PERL_SIGNALS&quot; in perlrun</a> and <a href="perlipc.html#Deferred-Signals-%28Safe-Signals%29">&quot;Deferred Signals (Safe Signals)&quot; in perlipc</a>.</p>

<p>In completely unrelated news, you can now use safe signals with POSIX::SigAction. See <a href="POSIX.html#POSIX%3A%3ASigAction">&quot;POSIX::SigAction&quot; in POSIX</a>.</p>

<h2 id="Tied-Arrays-with-Negative-Array-Indices"><a class="permalink" href="perl581delta.html#Tied-Arrays-with-Negative-Array-Indices">#</a><a id="Tied"></a>Tied Arrays with Negative Array Indices</h2>

<p>Formerly, the indices passed to <code>FETCH</code>, <code>STORE</code>, <code>EXISTS</code>, and <code>DELETE</code> methods in tied array class were always non-negative. If the actual argument was negative, Perl would call FETCHSIZE implicitly and add the result to the index before passing the result to the tied array method. This behaviour is now optional. If the tied array class contains a package variable named <code>$NEGATIVE_INDICES</code> which is set to a true value, negative values will be passed to <code>FETCH</code>, <code>STORE</code>, <code>EXISTS</code>, and <code>DELETE</code> unchanged.</p>

<h2 id="local-${$x}"><a class="permalink" href="perl581delta.html#local-$%7B$x%7D">#</a><a id="local"></a><a id="local-x"></a>local ${$x}</h2>

<p>The syntaxes</p>

<pre><code>local ${$x}
local @{$x}
local %{$x}</code></pre>

<p>now do localise variables, given that the $x is a valid variable name.</p>

<h2 id="Unicode-Character-Database-4.0.0"><a class="permalink" href="perl581delta.html#Unicode-Character-Database-4.0.0">#</a><a id="Unicode"></a>Unicode Character Database 4.0.0</h2>

<p>The copy of the Unicode Character Database included in Perl 5.8 has been updated to 4.0.0 from 3.2.0. This means for example that the Unicode character properties are as in Unicode 4.0.0.</p>

<h2 id="Deprecation-Warnings"><a class="permalink" href="perl581delta.html#Deprecation-Warnings">#</a><a id="Deprecation"></a>Deprecation Warnings</h2>

<p>There is one new feature deprecation. Perl 5.8.0 forgot to add some deprecation warnings, these warnings have now been added. Finally, a reminder of an impending feature removal.</p>

<h3 id="(Reminder)-Pseudo-hashes-are-deprecated-(really)"><a class="permalink" href="perl581delta.html#(Reminder)-Pseudo-hashes-are-deprecated-(really)">#</a><a id="Reminder-Pseudo-hashes-are-deprecated-really"></a>(Reminder) Pseudo-hashes are deprecated (really)</h3>

<p>Pseudo-hashes were deprecated in Perl 5.8.0 and will be removed in Perl 5.10.0, see <a href="perl58delta.html">perl58delta</a> for details. Each attempt to access pseudo-hashes will trigger the warning <code>Pseudo-hashes are deprecated</code>. If you really want to continue using pseudo-hashes but not to see the deprecation warnings, use:</p>

<pre><code>no warnings &#39;deprecated&#39;;</code></pre>

<p>Or you can continue to use the <a href="fields.html">fields</a> pragma, but please don&#39;t expect the data structures to be pseudohashes any more.</p>

<h3 id="(Reminder)-5.005-style-threads-are-deprecated-(really)"><a class="permalink" href="perl581delta.html#(Reminder)-5.005-style-threads-are-deprecated-(really)">#</a><a id="Reminder-5.005-style-threads-are-deprecated-really"></a>(Reminder) 5.005-style threads are deprecated (really)</h3>

<p>5.005-style threads (activated by <code>use Thread;</code>) were deprecated in Perl 5.8.0 and will be removed after Perl 5.8, see <a href="perl58delta.html">perl58delta</a> for details. Each 5.005-style thread creation will trigger the warning <code>5.005 threads are deprecated</code>. If you really want to continue using the 5.005 threads but not to see the deprecation warnings, use:</p>

<pre><code>no warnings &#39;deprecated&#39;;</code></pre>

<h3 id="(Reminder)-The-$*-variable-is-deprecated-(really)"><a class="permalink" href="perl581delta.html#(Reminder)-The-$*-variable-is-deprecated-(really)">#</a><a id="Reminder-The-variable-is-deprecated-really"></a>(Reminder) The $* variable is deprecated (really)</h3>

<p>The <code>$*</code> variable controlling multi-line matching has been deprecated and will be removed after 5.8. The variable has been deprecated for a long time, and a deprecation warning <code>Use of $* is deprecated</code> is given, now the variable will just finally be removed. The functionality has been supplanted by the <code>/s</code> and <code>/m</code> modifiers on pattern matching. If you really want to continue using the <code>$*</code>-variable but not to see the deprecation warnings, use:</p>

<pre><code>no warnings &#39;deprecated&#39;;</code></pre>

<h2 id="Miscellaneous-Enhancements"><a class="permalink" href="perl581delta.html#Miscellaneous-Enhancements">#</a><a id="Miscellaneous"></a>Miscellaneous Enhancements</h2>

<p><code>map</code> in void context is no longer expensive. <code>map</code> is now context aware, and will not construct a list if called in void context.</p>

<p>If a socket gets closed by the server while printing to it, the client now gets a SIGPIPE. While this new feature was not planned, it fell naturally out of PerlIO changes, and is to be considered an accidental feature.</p>

<p>PerlIO::get_layers(FH) returns the names of the PerlIO layers active on a filehandle.</p>

<p>PerlIO::via layers can now have an optional UTF8 method to indicate whether the layer wants to &quot;auto-:utf8&quot; the stream.</p>

<p>utf8::is_utf8() has been added as a quick way to test whether a scalar is encoded internally in UTF-8 (Unicode).</p>

<h1 id="Modules-and-Pragmata"><a class="permalink" href="perl581delta.html#Modules-and-Pragmata">#</a><a id="Modules"></a>Modules and Pragmata</h1>

<h2 id="Updated-Modules-And-Pragmata"><a class="permalink" href="perl581delta.html#Updated-Modules-And-Pragmata">#</a><a id="Updated"></a>Updated Modules And Pragmata</h2>

<p>The following modules and pragmata have been updated since Perl 5.8.0:</p>

<dl>

<dt id="base"><a class="permalink" href="perl581delta.html#base">#</a>base</dt>
<dd>

</dd>
<dt id="B::Bytecode"><a class="permalink" href="perl581delta.html#B::Bytecode">#</a><a id="B"></a>B::Bytecode</dt>
<dd>

<p>In much better shape than it used to be. Still far from perfect, but maybe worth a try.</p>

</dd>
<dt id="B::Concise"><a class="permalink" href="perl581delta.html#B::Concise">#</a><a id="B1"></a>B::Concise</dt>
<dd>

</dd>
<dt id="B::Deparse"><a class="permalink" href="perl581delta.html#B::Deparse">#</a><a id="B2"></a>B::Deparse</dt>
<dd>

</dd>
<dt id="Benchmark"><a class="permalink" href="perl581delta.html#Benchmark">#</a>Benchmark</dt>
<dd>

<p>An optional feature, <code>:hireswallclock</code>, now allows for high resolution wall clock times (uses Time::HiRes).</p>

</dd>
<dt id="ByteLoader"><a class="permalink" href="perl581delta.html#ByteLoader">#</a>ByteLoader</dt>
<dd>

<p>See B::Bytecode.</p>

</dd>
<dt id="bytes"><a class="permalink" href="perl581delta.html#bytes">#</a>bytes</dt>
<dd>

<p>Now has bytes::substr.</p>

</dd>
<dt id="CGI"><a class="permalink" href="perl581delta.html#CGI">#</a>CGI</dt>
<dd>

</dd>
<dt id="charnames"><a class="permalink" href="perl581delta.html#charnames">#</a>charnames</dt>
<dd>

<p>One can now have custom character name aliases.</p>

</dd>
<dt id="CPAN"><a class="permalink" href="perl581delta.html#CPAN">#</a>CPAN</dt>
<dd>

<p>There is now a simple command line frontend to the CPAN.pm module called <i>cpan</i>.</p>

</dd>
<dt id="Data::Dumper"><a class="permalink" href="perl581delta.html#Data::Dumper">#</a><a id="Data"></a>Data::Dumper</dt>
<dd>

<p>A new option, Pair, allows choosing the separator between hash keys and values.</p>

</dd>
<dt id="DB_File"><a class="permalink" href="perl581delta.html#DB_File">#</a>DB_File</dt>
<dd>

</dd>
<dt id="Devel::PPPort"><a class="permalink" href="perl581delta.html#Devel::PPPort">#</a><a id="Devel"></a>Devel::PPPort</dt>
<dd>

</dd>
<dt id="Digest::MD5"><a class="permalink" href="perl581delta.html#Digest::MD5">#</a><a id="Digest"></a>Digest::MD5</dt>
<dd>

</dd>
<dt id="Encode"><a class="permalink" href="perl581delta.html#Encode">#</a>Encode</dt>
<dd>

<p>Significant updates on the encoding pragma functionality (tr/// and the DATA filehandle, formats).</p>

<p>If a filehandle has been marked as to have an encoding, unmappable characters are detected already during input, not later (when the corrupted data is being used).</p>

<p>The ISO 8859-6 conversion table has been corrected (the 0x30..0x39 erroneously mapped to U+0660..U+0669, instead of U+0030..U+0039). The GSM 03.38 conversion did not handle escape sequences correctly. The UTF-7 encoding has been added (making Encode feature-complete with Unicode::String).</p>

</dd>
<dt id="fields"><a class="permalink" href="perl581delta.html#fields">#</a>fields</dt>
<dd>

</dd>
<dt id="libnet"><a class="permalink" href="perl581delta.html#libnet">#</a>libnet</dt>
<dd>

</dd>
<dt id="Math::BigInt"><a class="permalink" href="perl581delta.html#Math::BigInt">#</a><a id="Math"></a>Math::BigInt</dt>
<dd>

<p>A lot of bugs have been fixed since v1.60, the version included in Perl v5.8.0. Especially noteworthy are the bug in Calc that caused div and mod to fail for some large values, and the fixes to the handling of bad inputs.</p>

<p>Some new features were added, e.g. the broot() method, you can now pass parameters to config() to change some settings at runtime, and it is now possible to trap the creation of NaN and infinity.</p>

<p>As usual, some optimizations took place and made the math overall a tad faster. In some cases, quite a lot faster, actually. Especially alternative libraries like Math::BigInt::GMP benefit from this. In addition, a lot of the quite clunky routines like fsqrt() and flog() are now much much faster.</p>

</dd>
<dt id="MIME::Base64"><a class="permalink" href="perl581delta.html#MIME::Base64">#</a><a id="MIME"></a>MIME::Base64</dt>
<dd>

</dd>
<dt id="NEXT"><a class="permalink" href="perl581delta.html#NEXT">#</a>NEXT</dt>
<dd>

<p>Diamond inheritance now works.</p>

</dd>
<dt id="Net::Ping"><a class="permalink" href="perl581delta.html#Net::Ping">#</a><a id="Net"></a>Net::Ping</dt>
<dd>

</dd>
<dt id="PerlIO::scalar"><a class="permalink" href="perl581delta.html#PerlIO::scalar">#</a><a id="PerlIO"></a>PerlIO::scalar</dt>
<dd>

<p>Reading from non-string scalars (like the special variables, see <a href="perlvar.html">perlvar</a>) now works.</p>

</dd>
<dt id="podlators"><a class="permalink" href="perl581delta.html#podlators">#</a>podlators</dt>
<dd>

</dd>
<dt id="Pod::LaTeX"><a class="permalink" href="perl581delta.html#Pod::LaTeX">#</a><a id="Pod"></a>Pod::LaTeX</dt>
<dd>

</dd>
<dt id="PodParsers"><a class="permalink" href="perl581delta.html#PodParsers">#</a>PodParsers</dt>
<dd>

</dd>
<dt id="Pod::Perldoc"><a class="permalink" href="perl581delta.html#Pod::Perldoc">#</a><a id="Pod1"></a>Pod::Perldoc</dt>
<dd>

<p>Complete rewrite. As a side-effect, no longer refuses to startup when run by root.</p>

</dd>
<dt id="Scalar::Util"><a class="permalink" href="perl581delta.html#Scalar::Util">#</a><a id="Scalar"></a>Scalar::Util</dt>
<dd>

<p>New utilities: refaddr, isvstring, looks_like_number, set_prototype.</p>

</dd>
<dt id="Storable"><a class="permalink" href="perl581delta.html#Storable">#</a>Storable</dt>
<dd>

<p>Can now store code references (via B::Deparse, so not foolproof).</p>

</dd>
<dt id="strict"><a class="permalink" href="perl581delta.html#strict">#</a>strict</dt>
<dd>

<p>Earlier versions of the strict pragma did not check the parameters implicitly passed to its &quot;import&quot; (use) and &quot;unimport&quot; (no) routine. This caused the false idiom such as:</p>

<pre><code>use strict qw(@ISA);
@ISA = qw(Foo);</code></pre>

<p>This however (probably) raised the false expectation that the strict refs, vars and subs were being enforced (and that @ISA was somehow &quot;declared&quot;). But the strict refs, vars, and subs are <b>not</b> enforced when using this false idiom.</p>

<p>Starting from Perl 5.8.1, the above <b>will</b> cause an error to be raised. This may cause programs which used to execute seemingly correctly without warnings and errors to fail when run under 5.8.1. This happens because</p>

<pre><code>use strict qw(@ISA);</code></pre>

<p>will now fail with the error:</p>

<pre><code>Unknown &#39;strict&#39; tag(s) &#39;@ISA&#39;</code></pre>

<p>The remedy to this problem is to replace this code with the correct idiom:</p>

<pre><code>use strict;
use vars qw(@ISA);
@ISA = qw(Foo);</code></pre>

</dd>
<dt id="Term::ANSIcolor"><a class="permalink" href="perl581delta.html#Term::ANSIcolor">#</a><a id="Term"></a>Term::ANSIcolor</dt>
<dd>

</dd>
<dt id="Test::Harness"><a class="permalink" href="perl581delta.html#Test::Harness">#</a><a id="Test"></a>Test::Harness</dt>
<dd>

<p>Now much more picky about extra or missing output from test scripts.</p>

</dd>
<dt id="Test::More"><a class="permalink" href="perl581delta.html#Test::More">#</a><a id="Test1"></a>Test::More</dt>
<dd>

</dd>
<dt id="Test::Simple"><a class="permalink" href="perl581delta.html#Test::Simple">#</a><a id="Test2"></a>Test::Simple</dt>
<dd>

</dd>
<dt id="Text::Balanced"><a class="permalink" href="perl581delta.html#Text::Balanced">#</a><a id="Text"></a>Text::Balanced</dt>
<dd>

</dd>
<dt id="Time::HiRes"><a class="permalink" href="perl581delta.html#Time::HiRes">#</a><a id="Time"></a>Time::HiRes</dt>
<dd>

<p>Use of nanosleep(), if available, allows mixing subsecond sleeps with alarms.</p>

</dd>
<dt id="threads"><a class="permalink" href="perl581delta.html#threads">#</a>threads</dt>
<dd>

<p>Several fixes, for example for join() problems and memory leaks. In some platforms (like Linux) that use glibc the minimum memory footprint of one ithread has been reduced by several hundred kilobytes.</p>

</dd>
<dt id="threads::shared"><a class="permalink" href="perl581delta.html#threads::shared">#</a><a id="threads1"></a>threads::shared</dt>
<dd>

<p>Many memory leaks have been fixed.</p>

</dd>
<dt id="Unicode::Collate"><a class="permalink" href="perl581delta.html#Unicode::Collate">#</a><a id="Unicode1"></a>Unicode::Collate</dt>
<dd>

</dd>
<dt id="Unicode::Normalize"><a class="permalink" href="perl581delta.html#Unicode::Normalize">#</a><a id="Unicode2"></a>Unicode::Normalize</dt>
<dd>

</dd>
<dt id="Win32::GetFolderPath"><a class="permalink" href="perl581delta.html#Win32::GetFolderPath">#</a><a id="Win32"></a>Win32::GetFolderPath</dt>
<dd>

</dd>
<dt id="Win32::GetOSVersion"><a class="permalink" href="perl581delta.html#Win32::GetOSVersion">#</a><a id="Win321"></a>Win32::GetOSVersion</dt>
<dd>

<p>Now returns extra information.</p>

</dd>
</dl>

<h1 id="Utility-Changes"><a class="permalink" href="perl581delta.html#Utility-Changes">#</a><a id="Utility"></a>Utility Changes</h1>

<p>The <code>h2xs</code> utility now produces a more modern layout: <i>Foo-Bar/lib/Foo/Bar.pm</i> instead of <i>Foo/Bar/Bar.pm</i>. Also, the boilerplate test is now called <i>t/Foo-Bar.t</i> instead of <i>t/1.t</i>.</p>

<p>The Perl debugger (<i>lib/perl5db.pl</i>) has now been extensively documented and bugs found while documenting have been fixed.</p>

<p><code>perldoc</code> has been rewritten from scratch to be more robust and feature rich.</p>

<p><code>perlcc -B</code> works now at least somewhat better, while <code>perlcc -c</code> is rather more broken. (The Perl compiler suite as a whole continues to be experimental.)</p>

<h1 id="New-Documentation"><a class="permalink" href="perl581delta.html#New-Documentation">#</a><a id="New"></a>New Documentation</h1>

<p>perl573delta has been added to list the differences between the (now quite obsolete) development releases 5.7.2 and 5.7.3.</p>

<p>perl58delta has been added: it is the perldelta of 5.8.0, detailing the differences between 5.6.0 and 5.8.0.</p>

<p>perlartistic has been added: it is the Artistic License in pod format, making it easier for modules to refer to it.</p>

<p>perlcheat has been added: it is a Perl cheat sheet.</p>

<p>perlgpl has been added: it is the GNU General Public License in pod format, making it easier for modules to refer to it.</p>

<p>perlmacosx has been added to tell about the installation and use of Perl in Mac OS X.</p>

<p>perlos400 has been added to tell about the installation and use of Perl in OS/400 PASE.</p>

<p>perlreref has been added: it is a regular expressions quick reference.</p>

<h1 id="Installation-and-Configuration-Improvements"><a class="permalink" href="perl581delta.html#Installation-and-Configuration-Improvements">#</a><a id="Installation"></a>Installation and Configuration Improvements</h1>

<p>The Unix standard Perl location, <i>/usr/bin/perl</i>, is no longer overwritten by default if it exists. This change was very prudent because so many Unix vendors already provide a <i>/usr/bin/perl</i>, but simultaneously many system utilities may depend on that exact version of Perl, so better not to overwrite it.</p>

<p>One can now specify installation directories for site and vendor man and HTML pages, and site and vendor scripts. See <i>INSTALL</i>.</p>

<p>One can now specify a destination directory for Perl installation by specifying the DESTDIR variable for <code>make install</code>. (This feature is slightly different from the previous <code>Configure -Dinstallprefix=...</code>.) See <i>INSTALL</i>.</p>

<p>gcc versions 3.x introduced a new warning that caused a lot of noise during Perl compilation: <code>gcc -Ialreadyknowndirectory (warning: changing search order)</code>. This warning has now been avoided by Configure weeding out such directories before the compilation.</p>

<p>One can now build subsets of Perl core modules by using the Configure flags <code>-Dnoextensions=...</code> and <code>-Donlyextensions=...</code>, see <i>INSTALL</i>.</p>

<h2 id="Platform-specific-enhancements"><a class="permalink" href="perl581delta.html#Platform-specific-enhancements">#</a><a id="Platform"></a>Platform-specific enhancements</h2>

<p>In Cygwin Perl can now be built with threads (<code>Configure -Duseithreads</code>). This works with both Cygwin 1.3.22 and Cygwin 1.5.3.</p>

<p>In newer FreeBSD releases Perl 5.8.0 compilation failed because of trying to use <i>malloc.h</i>, which in FreeBSD is just a dummy file, and a fatal error to even try to use. Now <i>malloc.h</i> is not used.</p>

<p>Perl is now known to build also in Hitachi HI-UXMPP.</p>

<p>Perl is now known to build again in LynxOS.</p>

<p>Mac OS X now installs with Perl version number embedded in installation directory names for easier upgrading of user-compiled Perl, and the installation directories in general are more standard. In other words, the default installation no longer breaks the Apple-provided Perl. On the other hand, with <code>Configure -Dprefix=/usr</code> you can now really replace the Apple-supplied Perl (<b>please be careful</b>).</p>

<p>Mac OS X now builds Perl statically by default. This change was done mainly for faster startup times. The Apple-provided Perl is still dynamically linked and shared, and you can enable the sharedness for your own Perl builds by <code>Configure -Duseshrplib</code>.</p>

<p>Perl has been ported to IBM&#39;s OS/400 PASE environment. The best way to build a Perl for PASE is to use an AIX host as a cross-compilation environment. See README.os400.</p>

<p>Yet another cross-compilation option has been added: now Perl builds on OpenZaurus, a Linux distribution based on Mandrake + Embedix for the Sharp Zaurus PDA. See the Cross/README file.</p>

<p>Tru64 when using gcc 3 drops the optimisation for <i>toke.c</i> to <code>-O2</code> because of gigantic memory use with the default <code>-O3</code>.</p>

<p>Tru64 can now build Perl with the newer Berkeley DBs.</p>

<p>Building Perl on WinCE has been much enhanced, see <i>README.ce</i> and <i>README.perlce</i>.</p>

<h1 id="Selected-Bug-Fixes"><a class="permalink" href="perl581delta.html#Selected-Bug-Fixes">#</a><a id="Selected"></a>Selected Bug Fixes</h1>

<h2 id="Closures,-eval-and-lexicals"><a class="permalink" href="perl581delta.html#Closures,-eval-and-lexicals">#</a><a id="Closures"></a><a id="Closures-eval-and-lexicals"></a>Closures, eval and lexicals</h2>

<p>There have been many fixes in the area of anonymous subs, lexicals and closures. Although this means that Perl is now more &quot;correct&quot;, it is possible that some existing code will break that happens to rely on the faulty behaviour. In practice this is unlikely unless your code contains a very complex nesting of anonymous subs, evals and lexicals.</p>

<h2 id="Generic-fixes"><a class="permalink" href="perl581delta.html#Generic-fixes">#</a><a id="Generic"></a>Generic fixes</h2>

<p>If an input filehandle is marked <code>:utf8</code> and Perl sees illegal UTF-8 coming in when doing <code>&lt;FH&gt;</code>, if warnings are enabled a warning is immediately given - instead of being silent about it and Perl being unhappy about the broken data later. (The <code>:encoding(utf8)</code> layer also works the same way.)</p>

<p>binmode(SOCKET, &quot;:utf8&quot;) only worked on the input side, not on the output side of the socket. Now it works both ways.</p>

<p>For threaded Perls certain system database functions like getpwent() and getgrent() now grow their result buffer dynamically, instead of failing. This means that at sites with lots of users and groups the functions no longer fail by returning only partial results.</p>

<p>Perl 5.8.0 had accidentally broken the capability for users to define their own uppercase&lt;-&gt;lowercase Unicode mappings (as advertised by the Camel). This feature has been fixed and is also documented better.</p>

<p>In 5.8.0 this</p>

<pre><code>$some_unicode .= &lt;FH&gt;;</code></pre>

<p>didn&#39;t work correctly but instead corrupted the data. This has now been fixed.</p>

<p>Tied methods like FETCH etc. may now safely access tied values, i.e. resulting in a recursive call to FETCH etc. Remember to break the recursion, though.</p>

<p>At startup Perl blocks the SIGFPE signal away since there isn&#39;t much Perl can do about it. Previously this blocking was in effect also for programs executed from within Perl. Now Perl restores the original SIGFPE handling routine, whatever it was, before running external programs.</p>

<p>Linenumbers in Perl scripts may now be greater than 65536, or 2**16. (Perl scripts have always been able to be larger than that, it&#39;s just that the linenumber for reported errors and warnings have &quot;wrapped around&quot;.) While scripts that large usually indicate a need to rethink your code a bit, such Perl scripts do exist, for example as results from generated code. Now linenumbers can go all the way to 4294967296, or 2**32.</p>

<h2 id="Platform-specific-fixes"><a class="permalink" href="perl581delta.html#Platform-specific-fixes">#</a><a id="Platform1"></a>Platform-specific fixes</h2>

<p>Linux</p>

<ul>

<li><p>Setting $0 works again (with certain limitations that Perl cannot do much about: see <a href="perlvar.html#%240">&quot;$0&quot; in perlvar</a>)</p>

</li>
</ul>

<p>HP-UX</p>

<ul>

<li><p>Setting $0 now works.</p>

</li>
</ul>

<p>VMS</p>

<ul>

<li><p>Configuration now tests for the presence of <code>poll()</code>, and IO::Poll now uses the vendor-supplied function if detected.</p>

</li>
<li><p>A rare access violation at Perl start-up could occur if the Perl image was installed with privileges or if there was an identifier with the subsystem attribute set in the process&#39;s rightslist. Either of these circumstances triggered tainting code that contained a pointer bug. The faulty pointer arithmetic has been fixed.</p>

</li>
<li><p>The length limit on values (not keys) in the %ENV hash has been raised from 255 bytes to 32640 bytes (except when the PERL_ENV_TABLES setting overrides the default use of logical names for %ENV). If it is necessary to access these long values from outside Perl, be aware that they are implemented using search list logical names that store the value in pieces, each 255-byte piece (up to 128 of them) being an element in the search list. When doing a lookup in %ENV from within Perl, the elements are combined into a single value. The existing VMS-specific ability to access individual elements of a search list logical name via the $ENV{&#39;foo;N&#39;} syntax (where N is the search list index) is unimpaired.</p>

</li>
<li><p>The piping implementation now uses local rather than global DCL symbols for inter-process communication.</p>

</li>
<li><p>File::Find could become confused when navigating to a relative directory whose name collided with a logical name. This problem has been corrected by adding directory syntax to relative path names, thus preventing logical name translation.</p>

</li>
</ul>

<p>Win32</p>

<ul>

<li><p>A memory leak in the fork() emulation has been fixed.</p>

</li>
<li><p>The return value of the ioctl() built-in function was accidentally broken in 5.8.0. This has been corrected.</p>

</li>
<li><p>The internal message loop executed by perl during blocking operations sometimes interfered with messages that were external to Perl. This often resulted in blocking operations terminating prematurely or returning incorrect results, when Perl was executing under environments that could generate Windows messages. This has been corrected.</p>

</li>
<li><p>Pipes and sockets are now automatically in binary mode.</p>

</li>
<li><p>The four-argument form of select() did not preserve $! (errno) properly when there were errors in the underlying call. This is now fixed.</p>

</li>
<li><p>The &quot;CR CR LF&quot; problem of has been fixed, binmode(FH, &quot;:crlf&quot;) is now effectively a no-op.</p>

</li>
</ul>

<h1 id="New-or-Changed-Diagnostics"><a class="permalink" href="perl581delta.html#New-or-Changed-Diagnostics">#</a><a id="New1"></a>New or Changed Diagnostics</h1>

<p>All the warnings related to pack() and unpack() were made more informative and consistent.</p>

<h2 id="Changed-&quot;A-thread-exited-while-%d-threads-were-running&quot;"><a class="permalink" href="perl581delta.html#Changed-%22A-thread-exited-while-%25d-threads-were-running%22">#</a><a id="Changed"></a><a id="Changed-A-thread-exited-while-d-threads-were-running"></a>Changed &quot;A thread exited while %d threads were running&quot;</h2>

<p>The old version</p>

<pre><code>A thread exited while %d other threads were still running</code></pre>

<p>was misleading because the &quot;other&quot; included also the thread giving the warning.</p>

<h2 id="Removed-&quot;Attempt-to-clear-a-restricted-hash&quot;"><a class="permalink" href="perl581delta.html#Removed-%22Attempt-to-clear-a-restricted-hash%22">#</a><a id="Removed"></a><a id="Removed-Attempt-to-clear-a-restricted-hash"></a>Removed &quot;Attempt to clear a restricted hash&quot;</h2>

<p>It is not illegal to clear a restricted hash, so the warning was removed.</p>

<h2 id="New-&quot;Illegal-declaration-of-anonymous-subroutine&quot;"><a class="permalink" href="perl581delta.html#New-%22Illegal-declaration-of-anonymous-subroutine%22">#</a><a id="New2"></a><a id="New-Illegal-declaration-of-anonymous-subroutine"></a>New &quot;Illegal declaration of anonymous subroutine&quot;</h2>

<p>You must specify the block of code for <code>sub</code>.</p>

<h2 id="Changed-&quot;Invalid-range-&quot;%s&quot;-in-transliteration-operator&quot;"><a class="permalink" href="perl581delta.html#Changed-%22Invalid-range-%22%25s%22-in-transliteration-operator%22">#</a><a id="Changed1"></a><a id="Changed-Invalid-range-s-in-transliteration-operator"></a>Changed &quot;Invalid range &quot;%s&quot; in transliteration operator&quot;</h2>

<p>The old version</p>

<pre><code>Invalid [] range &quot;%s&quot; in transliteration operator</code></pre>

<p>was simply wrong because there are no &quot;[] ranges&quot; in tr///.</p>

<h2 id="New-&quot;Missing-control-char-name-in-\c&quot;"><a class="permalink" href="perl581delta.html#New-%22Missing-control-char-name-in-%5Cc%22">#</a><a id="New3"></a><a id="New-Missing-control-char-name-in-c"></a>New &quot;Missing control char name in \c&quot;</h2>

<p>Self-explanatory.</p>

<h2 id="New-&quot;Newline-in-left-justified-string-for-%s&quot;"><a class="permalink" href="perl581delta.html#New-%22Newline-in-left-justified-string-for-%25s%22">#</a><a id="New4"></a><a id="New-Newline-in-left-justified-string-for-s"></a>New &quot;Newline in left-justified string for %s&quot;</h2>

<p>The padding spaces would appear after the newline, which is probably not what you had in mind.</p>

<h2 id="New-&quot;Possible-precedence-problem-on-bitwise-%c-operator&quot;"><a class="permalink" href="perl581delta.html#New-%22Possible-precedence-problem-on-bitwise-%25c-operator%22">#</a><a id="New5"></a><a id="New-Possible-precedence-problem-on-bitwise-c-operator"></a>New &quot;Possible precedence problem on bitwise %c operator&quot;</h2>

<p>If you think this</p>

<pre><code>$x &amp; $y == 0</code></pre>

<p>tests whether the bitwise AND of $x and $y is zero, you will like this warning.</p>

<h2 id="New-&quot;Pseudo-hashes-are-deprecated&quot;"><a class="permalink" href="perl581delta.html#New-%22Pseudo-hashes-are-deprecated%22">#</a><a id="New6"></a><a id="New-Pseudo-hashes-are-deprecated"></a>New &quot;Pseudo-hashes are deprecated&quot;</h2>

<p>This warning should have been already in 5.8.0, since they are.</p>

<h2 id="New-&quot;read()-on-%s-filehandle-%s&quot;"><a class="permalink" href="perl581delta.html#New-%22read()-on-%25s-filehandle-%25s%22">#</a><a id="New7"></a><a id="New-read-on-s-filehandle-s"></a>New &quot;read() on %s filehandle %s&quot;</h2>

<p>You cannot read() (or sysread()) from a closed or unopened filehandle.</p>

<h2 id="New-&quot;5.005-threads-are-deprecated&quot;"><a class="permalink" href="perl581delta.html#New-%225.005-threads-are-deprecated%22">#</a><a id="New8"></a><a id="New-5.005-threads-are-deprecated"></a>New &quot;5.005 threads are deprecated&quot;</h2>

<p>This warning should have been already in 5.8.0, since they are.</p>

<h2 id="New-&quot;Tied-variable-freed-while-still-in-use&quot;"><a class="permalink" href="perl581delta.html#New-%22Tied-variable-freed-while-still-in-use%22">#</a><a id="New9"></a><a id="New-Tied-variable-freed-while-still-in-use"></a>New &quot;Tied variable freed while still in use&quot;</h2>

<p>Something pulled the plug on a live tied variable, Perl plays safe by bailing out.</p>

<h2 id="New-&quot;To%s:-illegal-mapping-&#39;%s&#39;&quot;"><a class="permalink" href="perl581delta.html#New-%22To%25s:-illegal-mapping-&#39;%25s&#39;%22">#</a><a id="New10"></a><a id="New-To-s:-illegal-mapping-s"></a>New &quot;To%s: illegal mapping &#39;%s&#39;&quot;</h2>

<p>An illegal user-defined Unicode casemapping was specified.</p>

<h2 id="New-&quot;Use-of-freed-value-in-iteration&quot;"><a class="permalink" href="perl581delta.html#New-%22Use-of-freed-value-in-iteration%22">#</a><a id="New11"></a><a id="New-Use-of-freed-value-in-iteration"></a>New &quot;Use of freed value in iteration&quot;</h2>

<p>Something modified the values being iterated over. This is not good.</p>

<h1 id="Changed-Internals"><a class="permalink" href="perl581delta.html#Changed-Internals">#</a><a id="Changed2"></a>Changed Internals</h1>

<p>These news matter to you only if you either write XS code or like to know about or hack Perl internals (using Devel::Peek or any of the <code>B::</code> modules counts), or like to run Perl with the <code>-D</code> option.</p>

<p>The embedding examples of <a href="perlembed.html">perlembed</a> have been reviewed to be up to date and consistent: for example, the correct use of PERL_SYS_INIT3() and PERL_SYS_TERM().</p>

<p>Extensive reworking of the pad code (the code responsible for lexical variables) has been conducted by Dave Mitchell.</p>

<p>Extensive work on the v-strings by John Peacock.</p>

<p>UTF-8 length and position cache: to speed up the handling of Unicode (UTF-8) scalars, a cache was introduced. Potential problems exist if an extension bypasses the official APIs and directly modifies the PV of an SV: the UTF-8 cache does not get cleared as it should.</p>

<p>APIs obsoleted in Perl 5.8.0, like sv_2pv, sv_catpvn, sv_catsv, sv_setsv, are again available.</p>

<p>Certain Perl core C APIs like cxinc and regatom are no longer available at all to code outside the Perl core of the Perl core extensions. This is intentional. They never should have been available with the shorter names, and if you application depends on them, you should (be ashamed and) contact perl5-porters to discuss what are the proper APIs.</p>

<p>Certain Perl core C APIs like <code>Perl_list</code> are no longer available without their <code>Perl_</code> prefix. If your XS module stops working because some functions cannot be found, in many cases a simple fix is to add the <code>Perl_</code> prefix to the function and the thread context <code>aTHX_</code> as the first argument of the function call. This is also how it should always have been done: letting the Perl_-less forms to leak from the core was an accident. For cleaner embedding you can also force this for all APIs by defining at compile time the cpp define PERL_NO_SHORT_NAMES.</p>

<p>Perl_save_bool() has been added.</p>

<p>Regexp objects (those created with <code>qr</code>) now have S-magic rather than R-magic. This fixed regexps of the form /...(??{...;$x})/ to no longer ignore changes made to $x. The S-magic avoids dropping the caching optimization and making (??{...}) constructs obscenely slow (and consequently useless). See also <a href="perlguts.html#Magic-Variables">&quot;Magic Variables&quot; in perlguts</a>. Regexp::Copy was affected by this change.</p>

<p>The Perl internal debugging macros DEBUG() and DEB() have been renamed to PERL_DEBUG() and PERL_DEB() to avoid namespace conflicts.</p>

<p><code>-DL</code> removed (the leaktest had been broken and unsupported for years, use alternative debugging mallocs or tools like valgrind and Purify).</p>

<p>Verbose modifier <code>v</code> added for <code>-DXv</code> and <code>-Dsv</code>, see <a href="perlrun.html">perlrun</a>.</p>

<h1 id="New-Tests"><a class="permalink" href="perl581delta.html#New-Tests">#</a><a id="New12"></a>New Tests</h1>

<p>In Perl 5.8.0 there were about 69000 separate tests in about 700 test files, in Perl 5.8.1 there are about 77000 separate tests in about 780 test files. The exact numbers depend on the Perl configuration and on the operating system platform.</p>

<h1 id="Known-Problems"><a class="permalink" href="perl581delta.html#Known-Problems">#</a><a id="Known"></a>Known Problems</h1>

<p>The hash randomisation mentioned in <a href="perl581delta.html#Incompatible-Changes">&quot;Incompatible Changes&quot;</a> is definitely problematic: it will wake dormant bugs and shake out bad assumptions.</p>

<p>If you want to use mod_perl 2.x with Perl 5.8.1, you will need mod_perl-1.99_10 or higher. Earlier versions of mod_perl 2.x do not work with the randomised hashes. (mod_perl 1.x works fine.) You will also need Apache::Test 1.04 or higher.</p>

<p>Many of the rarer platforms that worked 100% or pretty close to it with perl 5.8.0 have been left a little bit untended since their maintainers have been otherwise busy lately, and therefore there will be more failures on those platforms. Such platforms include Mac OS Classic, IBM z/OS (and other EBCDIC platforms), and NetWare. The most common Perl platforms (Unix and Unix-like, Microsoft platforms, and VMS) have large enough testing and expert population that they are doing well.</p>

<h2 id="Tied-hashes-in-scalar-context"><a class="permalink" href="perl581delta.html#Tied-hashes-in-scalar-context">#</a><a id="Tied1"></a>Tied hashes in scalar context</h2>

<p>Tied hashes do not currently return anything useful in scalar context, for example when used as boolean tests:</p>

<pre><code>if (%tied_hash) { ... }</code></pre>

<p>The current nonsensical behaviour is always to return false, regardless of whether the hash is empty or has elements.</p>

<p>The root cause is that there is no interface for the implementors of tied hashes to implement the behaviour of a hash in scalar context.</p>

<h2 id="Net::Ping-450_service-and-510_ping_udp-failures"><a class="permalink" href="perl581delta.html#Net::Ping-450_service-and-510_ping_udp-failures">#</a><a id="Net1"></a>Net::Ping 450_service and 510_ping_udp failures</h2>

<p>The subtests 9 and 18 of lib/Net/Ping/t/450_service.t, and the subtest 2 of lib/Net/Ping/t/510_ping_udp.t might fail if you have an unusual networking setup. For example in the latter case the test is trying to send a UDP ping to the IP address 127.0.0.1.</p>

<h2 id="B::C"><a class="permalink" href="perl581delta.html#B::C">#</a><a id="B3"></a>B::C</h2>

<p>The C-generating compiler backend B::C (the frontend being <code>perlcc -c</code>) is even more broken than it used to be because of the extensive lexical variable changes. (The good news is that B::Bytecode and ByteLoader are better than they used to be.)</p>

<h1 id="Platform-Specific-Problems"><a class="permalink" href="perl581delta.html#Platform-Specific-Problems">#</a><a id="Platform2"></a>Platform Specific Problems</h1>

<h2 id="EBCDIC-Platforms"><a class="permalink" href="perl581delta.html#EBCDIC-Platforms">#</a><a id="EBCDIC"></a>EBCDIC Platforms</h2>

<p>IBM z/OS and other EBCDIC platforms continue to be problematic regarding Unicode support. Many Unicode tests are skipped when they really should be fixed.</p>

<h2 id="Cygwin-1.5-problems"><a class="permalink" href="perl581delta.html#Cygwin-1.5-problems">#</a><a id="Cygwin"></a>Cygwin 1.5 problems</h2>

<p>In Cygwin 1.5 the <i>io/tell</i> and <i>op/sysio</i> tests have failures for some yet unknown reason. In 1.5.5 the threads tests stress_cv, stress_re, and stress_string are failing unless the environment variable PERLIO is set to &quot;perlio&quot; (which makes also the io/tell failure go away).</p>

<p>Perl 5.8.1 does build and work well with Cygwin 1.3: with (uname -a) <code>CYGWIN_NT-5.0 ... 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 ...</code> a 100% &quot;make test&quot; was achieved with <code>Configure -des -Duseithreads</code>.</p>

<h2 id="HP-UX:-HP-cc-warnings-about-sendfile-and-sendpath"><a class="permalink" href="perl581delta.html#HP-UX:-HP-cc-warnings-about-sendfile-and-sendpath">#</a><a id="HP"></a>HP-UX: HP cc warnings about sendfile and sendpath</h2>

<p>With certain HP C compiler releases (e.g. B.11.11.02) you will get many warnings like this (lines wrapped for easier reading):</p>

<pre><code class="plaintext">cc: &quot;/usr/include/sys/socket.h&quot;, line 504: warning 562:
  Redeclaration of &quot;sendfile&quot; with a different storage class specifier:
    &quot;sendfile&quot; will have internal linkage.
cc: &quot;/usr/include/sys/socket.h&quot;, line 505: warning 562:
  Redeclaration of &quot;sendpath&quot; with a different storage class specifier:
    &quot;sendpath&quot; will have internal linkage.</code></pre>

<p>The warnings show up both during the build of Perl and during certain lib/ExtUtils tests that invoke the C compiler. The warning, however, is not serious and can be ignored.</p>

<h2 id="IRIX:-t/uni/tr_7jis.t-falsely-failing"><a class="permalink" href="perl581delta.html#IRIX:-t/uni/tr_7jis.t-falsely-failing">#</a><a id="IRIX"></a><a id="IRIX:-t-uni-tr_7jis.t-falsely-failing"></a>IRIX: t/uni/tr_7jis.t falsely failing</h2>

<p>The test t/uni/tr_7jis.t is known to report failure under &#39;make test&#39; or the test harness with certain releases of IRIX (at least IRIX 6.5 and MIPSpro Compilers Version 7.3.1.1m), but if run manually the test fully passes.</p>

<h2 id="Mac-OS-X:-no-usemymalloc"><a class="permalink" href="perl581delta.html#Mac-OS-X:-no-usemymalloc">#</a><a id="Mac"></a>Mac OS X: no usemymalloc</h2>

<p>The Perl malloc (<code>-Dusemymalloc</code>) does not work at all in Mac OS X. This is not that serious, though, since the native malloc works just fine.</p>

<h2 id="Tru64:-No-threaded-builds-with-GNU-cc-(gcc)"><a class="permalink" href="perl581delta.html#Tru64:-No-threaded-builds-with-GNU-cc-(gcc)">#</a><a id="Tru64"></a><a id="Tru64:-No-threaded-builds-with-GNU-cc-gcc"></a>Tru64: No threaded builds with GNU cc (gcc)</h2>

<p>In the latest Tru64 releases (e.g. v5.1B or later) gcc cannot be used to compile a threaded Perl (-Duseithreads) because the system <code>&lt;pthread.h&gt;</code> file doesn&#39;t know about gcc.</p>

<h2 id="Win32:-sysopen,-sysread,-syswrite"><a class="permalink" href="perl581delta.html#Win32:-sysopen,-sysread,-syswrite">#</a><a id="Win322"></a><a id="Win32:-sysopen-sysread-syswrite"></a>Win32: sysopen, sysread, syswrite</h2>

<p>As of the 5.8.0 release, sysopen()/sysread()/syswrite() do not behave like they used to in 5.6.1 and earlier with respect to &quot;text&quot; mode. These built-ins now always operate in &quot;binary&quot; mode (even if sysopen() was passed the O_TEXT flag, or if binmode() was used on the file handle). Note that this issue should only make a difference for disk files, as sockets and pipes have always been in &quot;binary&quot; mode in the Windows port. As this behavior is currently considered a bug, compatible behavior may be re-introduced in a future release. Until then, the use of sysopen(), sysread() and syswrite() is not supported for &quot;text&quot; mode operations.</p>

<h1 id="Future-Directions"><a class="permalink" href="perl581delta.html#Future-Directions">#</a><a id="Future"></a>Future Directions</h1>

<p>The following things <b>might</b> happen in future. The first publicly available releases having these characteristics will be the developer releases Perl 5.9.x, culminating in the Perl 5.10.0 release. These are our best guesses at the moment: we reserve the right to rethink.</p>

<ul>

<li><p>PerlIO will become The Default. Currently (in Perl 5.8.x) the stdio library is still used if Perl thinks it can use certain tricks to make stdio go <b>really</b> fast. For future releases our goal is to make PerlIO go even faster.</p>

</li>
<li><p>A new feature called <i>assertions</i> will be available. This means that one can have code called assertions sprinkled in the code: usually they are optimised away, but they can be enabled with the <code>-A</code> option.</p>

</li>
<li><p>A new operator <code>//</code> (defined-or) will be available. This means that one will be able to say</p>

<pre><code>$a // $b</code></pre>

<p>instead of</p>

<pre><code>defined $a ? $a : $b</code></pre>

<p>and</p>

<pre><code>$c //= $d;</code></pre>

<p>instead of</p>

<pre><code>$c = $d unless defined $c;</code></pre>

<p>The operator will have the same precedence and associativity as <code>||</code>. A source code patch against the Perl 5.8.1 sources will be available in CPAN as <i>authors/id/H/HM/HMBRAND/dor-5.8.1.diff</i>.</p>

</li>
<li><p><code>unpack()</code> will default to unpacking the <code>$_</code>.</p>

</li>
<li><p>Various Copy-On-Write techniques will be investigated in hopes of speeding up Perl.</p>

</li>
<li><p>CPANPLUS, Inline, and Module::Build will become core modules.</p>

</li>
<li><p>The ability to write true lexically scoped pragmas will be introduced.</p>

</li>
<li><p>Work will continue on the bytecompiler and byteloader.</p>

</li>
<li><p>v-strings as they currently exist are scheduled to be deprecated. The v-less form (1.2.3) will become a &quot;version object&quot; when used with <code>use</code>, <code>require</code>, and <code>$VERSION</code>. $^V will also be a &quot;version object&quot; so the printf(&quot;%vd&quot;,...) construct will no longer be needed. The v-ful version (v1.2.3) will become obsolete. The equivalence of strings and v-strings (e.g. that currently 5.8.0 is equal to &quot;\5\8\0&quot;) will go away. <b>There may be no deprecation warning for v-strings</b>, though: it is quite hard to detect when v-strings are being used safely, and when they are not.</p>

</li>
<li><p>5.005 Threads Will Be Removed</p>

</li>
<li><p>The <code>$*</code> Variable Will Be Removed (it was deprecated a long time ago)</p>

</li>
<li><p>Pseudohashes Will Be Removed</p>

</li>
</ul>

<h1 id="Reporting-Bugs"><a class="permalink" href="perl581delta.html#Reporting-Bugs">#</a><a id="Reporting"></a>Reporting Bugs</h1>

<p>If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at http://bugs.perl.org/ . There may also be information at http://www.perl.com/ , the Perl Home Page.</p>

<p>If you believe you have an unreported bug, please run the <b>perlbug</b> program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of <code>perl -V</code>, will be sent off to perlbug@perl.org to be analysed by the Perl porting team. You can browse and search the Perl 5 bugs at http://bugs.perl.org/</p>

<h1 id="SEE-ALSO"><a class="permalink" href="perl581delta.html#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1>

<p>The <i>Changes</i> file for exhaustive details on what changed.</p>

<p>The <i>INSTALL</i> file for how to build Perl.</p>

<p>The <i>README</i> file for general stuff.</p>

<p>The <i>Artistic</i> and <i>Copying</i> files for copyright information.</p>


      </div>
      <div id="footer">
        <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p>

<p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p>


      </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src="../highlight.pack.js"></script>
    <script>hljs.highlightAll();</script>
  </body>
</html>
